﻿/*document.onmousemove = mouseMove;
document.onmouseup   = mouseUp;

var dragObject  = null;
var mouseOffset = null;

function mouseCoords(ev){
	if(ev.pageX || ev.pageY){
		return {x:ev.pageX, y:ev.pageY};
	}
	return {
		x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
		y:ev.clientY + document.body.scrollTop  - document.body.clientTop
	};
}

function getMouseOffset(target, ev){
	ev = ev || window.event;

	var docPos    = getPosition(target);
	var mousePos  = mouseCoords(ev);
	return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
}

function getPosition(e){
	var left = 0;
	var top  = 0;

	while (e.offsetParent){
		left += e.offsetLeft;
		top  += e.offsetTop;
		e     = e.offsetParent;
	}

	left += e.offsetLeft;
	top  += e.offsetTop;

	return {x:left, y:top};
}

function mouseMove(ev){
	ev           = ev || window.event;
	var mousePos = mouseCoords(ev);

	if(dragObject){
		dragObject.style.position = 'absolute';
		dragObject.style.top      = mousePos.y - mouseOffset.y;
		dragObject.style.left     = mousePos.x - mouseOffset.x;

		return false;
	}
}
function mouseUp(){
	dragObject = null;
}

function makeDraggable(item){
	if(!item) return;
	item.onmousedown = function(ev){
		dragObject  = this;
		mouseOffset = getMouseOffset(this, ev);
		return false;
	}
}*/

function submitPage()
{
    //var id = id1.length ;
    var curURL = location.href ;
    if (curURL.indexOf('&XRANK') >= 0)
        curURL = curURL.substring(0, curURL.indexOf('&XRANK')+1) ;
    curURL += '&XRANK=' ;
    var divWt = document.getElementById("navigator_weights");
    var divArrChk = divWt.getElementsByTagName('div') ;
    for (var i=1; i<divArrChk.length; i++)
    {
        if (i>1)
            curURL += '~~~~~' ;
         curURL += (divArrChk[i].childNodes[0].nodeValue.replace(':','~/~') + '~/~' + divArrChk[i].childNodes[1].value) ;
    }
    //alert('curURL = ' + curURL) ;
    //window.location = curURL + "&XRANK=contactstate~/~England~/~200~~~~~contactcity~/~Milton Keynes~/~500"
    window.location = curURL ;
}

function addElement(navValue)
{
    
}